package zhaoyong.wang.tlias.mapper;

import org.apache.ibatis.annotations.*;
import zhaoyong.wang.tlias.pojo.Dept;

import java.util.List;

@Mapper
public interface DeptMapper {
    //查询全部部门数据
    @Select("select * from dept")
    List<Dept> list();
    @Delete("delete from dept where id = #{id}")
    void deleteById(Integer id);
    @Insert("INSERT into dept(name, create_time, update_time) values (#{name},#{createTime},#{updateTime})")
    void update(Dept deptname);
    @Select("select * from dept where id = #{id}")
    Dept selcetById(Integer id);

    @Update("update dept set name = #{name},update_time = #{updateTime} where id = #{id}")
    void gengxin(Dept dept);
}
